import {Component} from "react";
import PropTypes from 'prop-types'

import invariant from 'invariant'

export default class Route extends Component{

  static propTypes = {
    path: PropTypes.string,
    component: PropTypes.oneOfType([PropTypes.element,PropTypes.func]),
  }
  render() {
    // Route元素不需要呈现，就是不需要渲染
    return invariant(false,"<Route> 元素仅用于配置，不应呈现");
  }
}
